package string;

public class MatchesDemo {
    public static void main(String[] args) {
        String a = "fancq@tedu.cn";
        String b = "[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean match = a.matches(b);
        if (match){
            System.out.println("是邮箱");
        }else{
            System.out.println("不是邮箱");
        }
    }
}
